<?php
//update lại tổng cọc, tổng tiền hiện tại cho toàn bộ khách hàng
include_once '../include/common.php';
$core = new core();

$list_customer_order_detail = $core->db->get_results("SELECT * FROM zen_customer_order_detail");
if($list_customer_order_detail){
    $count=1;
    foreach($list_customer_order_detail as $order_detail){

        $core->db->query("UPDATE zen_customer_order_detail SET
                order_product_num= $order_detail->product_num
                    WHERE id=$order_detail->id");
        echo "update success<br/>";
    }

}
echo "DONE";
?>